<?php
//--------------------------------------------------
// Patch file:	patch_ucp_calendar.php
// Patch time:	Tue 02 May 2006, 16:30 (GMT)
//--------------------------------------------------
if ( !defined('IN_PHPBB') )
{
	die('Hack attempt');
}

// header
$patch_version = '1.0.0';
$patch_date = '20060502';
$patch_author = 'ptirhiik';
$patch_ref = 'Calendar_settings';

// panels and fields
$patch_data = array(
	'ucp' => array(
		'name' => 'User_control_panel',
		'options' => array(

			'prefs' => array(
				'name' => 'Preferences',
				'options' => array(

					'calendar' => array(
						'name' => 'Calendar_settings',
						'auth' => array(POST_GROUPS_URL => 'ucp_edit_calendar'),
						'fields' => array(
							'user_calendar_javascript' => array('type' => 'radio_list', 'legend' => 'Calendar_use_java', 'field' => 'user_calendar_javascript', 'options' => '[var]list_dft_yes_deny'),
							'user_calendar_overview' => array('type' => 'radio_list', 'legend' => 'Calendar_overview', 'field' => 'user_calendar_overview', 'options' => '[var]list_dft_yes_deny'),
							'user_calendar_display_open' => array('type' => 'radio_list', 'legend' => 'Calendar_display_open', 'field' => 'user_calendar_display_open', 'options' => '[var]list_dft_yes_deny'),
							'user_calendar_week_start' => array('type' => 'list', 'legend' => 'Calendar_week_start', 'field' => 'user_calendar_week_start', 'options' => '[var]calendar_days_of_week'),
							'user_calendar_title_length' => array('type' => 'int', 'legend' => 'Calendar_title_length', 'field' => 'user_calendar_title_length'),
							'user_calendar_text_length' => array('type' => 'int', 'legend' => 'Calendar_text_length', 'field' => 'user_calendar_text_length'),
							'user_calendar_header_cells' => array('type' => 'int', 'legend' => 'Calendar_header_cells', 'field' => 'user_calendar_header_cells'),
							'user_calendar_nb_row' => array('type' => 'int', 'legend' => 'Calendar_nb_row', 'field' => 'user_calendar_nb_row', 'value_mini' => '5', 'value_maxi' => '25'),
						),
					),
				),
			),
		),
	),
);


// auths definitions
$patch_auths = array(
	POST_GROUPS_URL => array(
		'ucp_edit_calendar' => array(
			GROUP_ADMIN => array(GROUP_ANONYMOUS => true, GROUP_FOUNDER => DENY, GROUP_ADMIN => DENY, GROUP_REGISTERED => true),
			GROUP_REGISTERED => array(GROUP_OWN => true),
		),
	),
);


?>